package com.addcn.android.design591.activity;

import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.v4.app.FragmentTabHost;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;
import android.widget.TabHost;

import com.addcn.android.design591.R;

/**
 * Created by xuge on 2017/1/8.
 */

public class MyFragmentTabHost extends AppCompatActivity {


    private FrameLayout realtabcontent;
    private FrameLayout tabcontent;
    private FragmentTabHost tabhost;

    @Override
    public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
        super.onCreate(savedInstanceState, persistentState);
        setContentView(R.layout.myfragmenttabhost);
        initView();
    }

    private void initView() {
        realtabcontent = (FrameLayout) findViewById(R.id.realtabcontent);
        tabcontent = (FrameLayout) findViewById(android.R.id.tabcontent);



        tabhost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
        TabHost.TabSpec mtabSpec=tabhost.newTabSpec("1");


    }
}
